<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
    <style>
        .red{
            color: red;
        }
    </style>
  </head>
  <body>
    <div id="app">
      <div v-cloak @click="change">
        {{ message }}{{$i}}
        <child></child>
        <button @click="change">点击</button>
      </div>
    </div>
  </body>
  <script src="./vue.js"></script>
  <script>
      Vue.component('child',{
        data(){
            return{
                a:1
            }
        },
        template:'<h2>123</h2>',
        props:['as']
    })
    new Vue({
      el: "#app",
      data() {
        return {
          message: "消息",
                $i:4
        };
      },
      methods: {
          change(){
              this.message = '改变后的消息';
          }
      },
    });
  </script>
</html>
